package threads;

import java.util.concurrent.*;

public class ThreadPool {
    public static void main(String[] args) {
        ExecutorService executor = Executors.newFixedThreadPool(3);
        StudentThread student1=new StudentThread("六六","963258");
        StudentThread student2=new StudentThread("尔尔","789456");
        StudentThread student3=new StudentThread("毵毵","741852");
        StudentThread[] students = {student1,student2,student3};
        executor.execute(new Greetings("早上好",50));
        executor.execute(new Greetings("拜拜",50));
        executor.execute(new StudentThread(students));

        executor.shutdown();



    }
}
